home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 126-150 / disk_131 / hyperbase / manual < prev    next >
Text File  |  1992-05-06  |  22KB  |  604 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.         HyperBase  1.6 (c) 1987 , 1988
  9.               by 
  10.         General Design
  11.         P.O. Box 2352
  12.         West Lafayette,  IN  47906
  13.     
  14.     
  15.         Programming Team
  16.     
  17.         Michael MacKenzie
  18.         Marc Mengel
  19.         Craig Norborg
  20.     
  21.     
  22.  
  23.  
  24.  
  25. PART ONE - FILE OPTION 
  26.     New: Not implemented.
  27.         
  28.     Open:  The open option will open the database, sort index, 
  29.         screen format, and printer format files. It will ask you
  30.         for a filename, and will open  filename.dat,  filename.ind,
  31.         filename.fmt,  filename.prt ,  respectively.
  32.  
  33.     Open file:  The open  file option allows you to open up a new 
  34.         format file, printer format file, or sort index.  The sub
  35.         menu attached to open contains either:
  36.  
  37.         Database:  Allows you to open either just a new datafile
  38.         or a new datafile and all the default files with it; or
  39.  
  40.         Format:  Allows you to open a new format file for the
  41.         screen.  BEWARE!  There is no check to see that the format 
  42.         file "fits" the data file, so be sure you are opening a 
  43.         valid format for the current database!
  44.  
  45.         Printer:  Allows you to read in a new printer format for
  46.         the current database.  Also beware on this to have a valid 
  47.         format for the current data.  The printer format will 
  48.         load a ".prt" file associated with the filename.
  49.  
  50.         Index:  This option allows you to read in a previously made
  51.         sort index for this datafile.  Be very careful to read in
  52.         a valid sort index for this datafile, or you will have 
  53.         unpredictable results!
  54.  
  55.         When one of the Open options is chosen, a request will be
  56.         put on the screen allowing the user to chose the file of
  57.         his choice.  If you do not specify an extension, one will
  58.         be catenated to the filename for you.  i.e.  If you specify
  59.         foo.fmt for the printer format file, foo.fmt will be opened.
  60.         If you specify foo, foo.prt will be opened.
  61.  
  62.     Print:  This option is to print out the entire database, in the 
  63.         current sort order, using the current printer format.  
  64.  
  65.     Cleanup:  This option will really delete all records previously 
  66.         flagged as being deleted.  The old version of the database
  67.         is left on the disk under the name datafile.bak, so    if you 
  68.         don't have enough disk space for another copy of the 
  69.         database, it would be best to get rid of any un-needed files 
  70.         so you have enough room to perform this operation.
  71.  
  72.  
  73.  
  74. PART TWO - SORT OPTIONS 
  75.     Sort:  This option allows the user to sort his datafiles.  As of 
  76.     this release, the user must input the field numbers by which 
  77.     he wants to sort on.  For example, if the name field was 
  78.     field number 1, and the state field was field number 2, and 
  79.     you wanted to sort by state, and then name (for all states that
  80.     were the same) you would type in 2 [ret] 1 [ret] then by a "." 
  81.     to indicate that you are finished.  One thing we should mention 
  82.     to the user is that if you wish to improve the speed in which 
  83.     the database sorts, we have provided an adjustable internal buffer 
  84.     for your convenience.  As of this release, it is controlled by 
  85.     the third command line argument and defaults to a size of 20.  
  86.     What this means is that if your datafile was less than 20 
  87.     records long, it would sort it all in RAM (which is faster).  
  88.     By setting this to a larger value for larger datafiles, you can 
  89.     greatly improve the speed of sorting on these datafiles.  For 
  90.     an example, if you had a datafile of 800 names for a mailing 
  91.     list called "mail" and you wanted to make the buffer size be
  92.     1/4 of the file size, you would type in:
  93.  
  94.         "hyperbase mail 200" 
  95.     
  96.     
  97.     and this would invoke hyperbase with the datafile called "mail" 
  98.     with a buffer size of 200!  
  99.  
  100.     Save Index:  This option allows the user to save the previously 
  101.     created sort index.  You will be asked a file name for the 
  102.     sort index to be put under and a ".ind" will be appended to 
  103.     the file name so it is easily identifiable as a sort index.  
  104.  
  105.  
  106. PART THREE - SEARCH OPTIONS 
  107.     
  108.     Search:  The search option is used to search for a record, or a 
  109.      set of records.  The way this is done is, after you select 
  110.      the search option, a screen with a blank datafile format 
  111.      appears on the screen.  You then go to as many fields as 
  112.      you wish and use the backwards arrow (<-) to position your
  113.     cursor in the position BEFORE the field you wish to search 
  114.     for.  In this one-character field, you may input one of:
  115.         ">"             Greater Than 
  116.         "<"             Less than
  117.         "="             Equal to 
  118.         "!"             Not equal to
  119.     and search according to whatever you then type into the 
  120.     field.  By leaving a field blank, it will default to every 
  121.     record being a match.
  122.  
  123.     Display:
  124.  
  125.     Screen: This will bring the database up in a "browse" type
  126.         mode on the screen where you can look at the found records 
  127.         one by one.
  128.  
  129.     Printer: This will print out the results of your search using
  130.         the current printer format.  If no printer format was 
  131.         specified, the current screen format will be used.  
  132.  
  133.     Delete Found:  This is a very useful option, which will allow 
  134.         you to delete all records that were found in the last search.  
  135.  
  136.     Delete not Found:  This option is very much like the last one, 
  137.         but allows you to delete all records not found in the last 
  138.         search.
  139.  
  140.     Search for Deleted: This option searches for records that are
  141.         marked as deleted, but haven't actually been removed by 
  142.         the Cleanup facility.  After doing this, you can go into 
  143.         your datafile using the Display Screen option and undelete
  144.         records just like you deleted records.  
  145.  
  146.  
  147. PART FOUR - BROWSE OPTIONS 
  148.  
  149.     View:  This command will put you in "view" mode where you will be 
  150.     able to look at your datafile, one record at a time.  If you
  151.     make changes to the record, they are saved only if you choose
  152.     Save from the File options menu.  If you choose Quit the changes
  153.     to this record are lost.
  154.     
  155.     Insert:  This command allows you to  go into your datafile and 
  156.     change data or add new data.  It looks like "view" mode, but 
  157.     starts with a blank record.  If you choose forward from the
  158.     Browse menu or Save from the file menu, your new record should
  159.     be saved.  The database inserts records in sorted order. If you
  160.     have specified a sort order for this database, new records will
  161.     be inserted in that order, and the current record number may change.
  162.  
  163.  
  164.  
  165. Using HyperBase Browse Menu Options
  166.  
  167.     PART ONE - FILE OPTIONS
  168.  
  169.     Save:  This option allows the user to save the changes made
  170.         while in a browse mode.
  171.  
  172.     Redraw:  This option is for redrawing a screen that may have
  173.         become corrupted in some manner.
  174.  
  175.     Quit:  This option allows the user to quit and not save any
  176.         changes made to the database in the current editing session.  
  177.  
  178.     PART TWO - EDIT OPTIONS
  179.  
  180.     Kill Field:  This option allow you to easily kill all
  181.         text/numbers in an entire field in one keystroke.
  182.  
  183.     Delete:  This option allows the user to mark a record as deleted.
  184.         NOTE:  This option only flags the record as deleted in the 
  185.         datafile, to actually delete the record, one must use 
  186.         the "cleanup" option from the main menu.
  187.  
  188.     UnDelete:  This option is a special option that only shows up
  189.        when in undelete record mode from the main menu.  It takes 
  190.        the place of delete in the menu structure, and will allow 
  191.        a user to "undelete" a record by resetting the delete flag. 
  192.        Once the "Cleanup" option is used, undeleting records 
  193.        previously deleted will not work!  
  194.  
  195.     PART THREE - BROWSE OPTIONS
  196.     The browse options allow the user to go forward and backward
  197.     through the database.  Browsing through a database depends
  198.     on the sort order to find its records and it will be necessary
  199.     to have a sort index loaded or use the Sort option from the main
  200.     menu before browsing through the datafile.  
  201.     
  202.     Forward:  This option allows the user to go forward one record 
  203.         in the database according to the current sort order.
  204.         In Insert mode, it saves the current record & prepares
  205.         a new blank record.
  206.  
  207.     Back:  This option allows the user to go back one record in the
  208.         database according to the current sort order.
  209.         This option is not available in Insert mode.
  210.  
  211.     Goto:  This option prompts the user for a record number to go
  212.         to and proceeds to go to that record.  If the record number 
  213.         input is greater than the amount of records, it will go to 
  214.         the last record in the database.  Negative record numbers 
  215.         will not be permitted.  This option is not available in 
  216.         Insert mode or in view search mode.
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223. Format File Options
  224.  
  225.     Valid operators for for use in a formula are:  
  226.     +       -     Addition 
  227.     -       -       Subtraction 
  228.     *       -       Multiplication
  229.     /       -       Division 
  230.     &       -       String Catenation 
  231.     []    -       SubString Operations 
  232.  
  233.     Valid characters for building an input format are:  
  234.     #       -       Allows input of one numeric character.
  235.     _       -       Allows input of one alphanumeric character.  (Underbar)
  236.     ^       -       Makes the user type return, tab, or right 
  237.             arrow to go onto the next field.  This is 
  238.             only valid at the end of a field.  It prevents
  239.             the user from accidentally typing into the
  240.             next field.
  241.  
  242.     Any other alphanumeric character in an input format is taken to 
  243.     be a literal character that shows up in a field.  For example,
  244.     the dashes in a telephone number, or the dash in a zip code, etc.  
  245.     If such a character is put in the field, it will be skipped over 
  246.     during input, it will not show up in the datafile, and the user 
  247.     will not be allowed to type on it.  
  248.  
  249.     If you wish to put a comma, quote or backslash as a literal 
  250.     character in a format, you must put a backslash before this 
  251.     character. 
  252.  
  253.     Each line of a format file consists of:  
  254.  
  255.         1) A Label 
  256.         2) A Row Number 
  257.         3) A Column Number 
  258.         4) A Page Number (currently unimplemented, use 1) 
  259.         5) An Output Format (used only with formulas) 
  260.         6) A Formula (optionally empty) 
  261.         7) An Input Format (optionally empty) 
  262.  
  263.     Each is followed by a comma.  For example:  
  264.     
  265.         Label, 1, 1, 1, $###, {1} + {2}, ______, 
  266.     
  267.     defines a format which:
  268.       1) prints the label "Label" at 
  269.       2) row 1, 
  270.       3) column 1, 
  271.       4) on page number 1.
  272.       5) It outputs a $ followed by the first three characters 
  273.          of the result of
  274.       6) adding fields 1 and 2.
  275.       7) It allows the input of 6 alphanumeric characters.
  276.  
  277.     The row, column, and page fields must be filled in.  The label
  278.     can be empty, but must still have the comma.  This is the same
  279.     with the output format, formula and the input format.
  280.  
  281.         ,10,20,1, , , , 
  282.     
  283.     1) Produces an unlabeled field at 
  284.     2) row 10, 
  285.     3) column 20, 
  286.     4) page 1 
  287.     5) It has no output format, 
  288.     6) no formula, and 
  289.     7) no input format.  (essentially a blank line) 
  290.  
  291.     There are also sub-string and catenation operations in
  292.     HyperBase that will allow you to take apart and re-assemble
  293.     strings. To get part of a string, put a pair of brackets after
  294.     a string designator and put either one number or a pair of
  295.     numbers separated by a comma.  A string designator is anything
  296.     that represents a string.  You can catenate two strings and
  297.     take a substring of the resulting string or any combination of
  298.     catenations and substrings.  One thing you must make sure to
  299.     do is to parenthesis your string catenations so the substring
  300.     operator knows which string to take a substring of.  For
  301.     example:
  302.  
  303.         ({1} & {2})[10,20] 
  304.         
  305.     will take fields 1 and 2, catenate them together, and then pull
  306.     out the tenth through twentieth characters of the result.  That 
  307.     is, if field 1 is "abcdfghijklmn" and field 2 is "ABCDEFGH",
  308.     the above formula would result in "klmnABCDEF"
  309.     To take a single character out of a string, you only put one number 
  310.     in the brackets.  For example:
  311.  
  312.         {22}[13] 
  313.  
  314.     will take the 13th character in field 22 and return this.  
  315.  
  316.     Printer Format Files:  The printing format file is identical
  317.     to the screen format file, except for that all of its formulas are
  318.     based on the current screen field numbers.  Feel free to use them
  319.     interchangeably, although a special printer format file may 
  320.     sometimes be necessary.  If  you wish to put in a form feed in 
  321.     the printer format file to start each record on a page of its own,
  322.     you should create a field with a label of cntl-L.  Use this same 
  323.     method to send other control characters to your printer for things 
  324.     such as underlining, etc. 
  325.  
  326.     The screen format is used as the printer format by default.
  327.  
  328.  
  329.  
  330. Tutorial 
  331.  
  332.     In this tutorial section, we will show you, step by step, 
  333.     how to create a database for a mailing list, and how to put it in
  334.     practical use.  Because all of the mailing list files discussed in
  335.     this tutorial are on the disk, we urge you to go into your favorite
  336.     editor and at least look at the files!  
  337.  
  338.     STEP 1 
  339.     The first thing that you must decide is what data you want to 
  340.     keep track of in this mailing list.  A couple of things you
  341.     would want to put in a mailing list would be: 
  342.  
  343.         First Name
  344.         Last Name
  345.         Address
  346.         City
  347.         State
  348.         Zip Code
  349.         Telephone
  350.  
  351.  
  352.     STEP 2  
  353.  
  354.     You must decide how big each field should be.  Let's say we 
  355.     decide on the following sizes:  
  356.     
  357.         First Name    15 characters 
  358.         Last Name    15     "
  359.         Address    25     "
  360.         City    25     "
  361.         State    2      " 
  362.         Zip Code    9   digits
  363.         Telephone    10  digits 
  364.  
  365.     Now that you have decided on the size of each field, you must 
  366.     also determine the layout of the record for the screen.  For 
  367.     example, you could decide to have both the first and last names 
  368.     on the first line, the Address on the third line by itself, and
  369.     the Address, City, and State on the fith line, with the Zip Code
  370.     on the seventh line, underneath the State, and the telephone
  371.     number beneath that. You may also decide to put dashes in the 
  372.     proper places on the Zip Code and the Telephone number, something
  373.     like:
  374.  
  375.     01234567890123456789012345678901234567890123456789012345678901234567
  376.  
  377.     First Name: _______________             Last Name: _______________
  378.  
  379.     Address: _________________________
  380.  
  381.     City: _________________________         State: __
  382.  
  383.     Zip Code: #####-####
  384.  
  385.     Telephone Number: (###) ###-####
  386.  
  387.  
  388.     STEP 3
  389.  
  390.     From this, you can build your format file.  Consider each portion
  391.     of a line in a format file. Each line of a format file consists of:  
  392.  
  393.         1) A Label 
  394.         2) A Row Number 
  395.         3) A Column Number 
  396.         4) A Page Number (currently unimplemented, use 1) 
  397.         5) An Output Format (used only with formulas) 
  398.         6) A Formula (optionally empty) 
  399.         7) An Input Format (optionally empty) 
  400.  
  401.     The fields of the format file are separated by commas. In our example,
  402.     the first name field of our mailing list would be:
  403.  
  404.         First Name, 1, 1, 1, , , _______________, 
  405.  
  406.     This says :
  407.       1) The field "First Name" is in 
  408.       2) row 1, 
  409.       3) column 1 
  410.       4) on page 1. 
  411.       5) There is no special output format and 
  412.       6) no formula, and that
  413.       7) the allowed input is 15 alphanumeric characters.  
  414.     
  415.     Now, if we just go ahead and interpret the rest of our mailing 
  416.     list, we can make our own format file.  It will look something 
  417.     like this:  
  418.  
  419.         First Name,1,1,1,,,_______________,_________________________,
  420.         City,5,1,1,,,________________________,
  421.         State, 5, 40, 1, , , __, 
  422.         Zip Code, 7, 1, 1, , ,#####-####, 
  423.         Telephone Number, 9, 1, 1, , , (###) ###-####,
  424.  
  425.     STEP 4 
  426.     Since HyperBase thinks that all format files end in a ".fmt", 
  427.     call this file "mail.fmt" when saving it.  Now, since one of 
  428.     the objectives in having a mailing list was to print mailing 
  429.     labels, you may want to design a format that will be the mailing 
  430.     label itself to be used as the printer format file.   On a 
  431.     mailing label you would want to put:
  432.  
  433.         1) The first and last name joined together.  
  434.         2) The address.  
  435.         3) The city, state, and zip code.  
  436.  
  437.     Ignore all of the other fields since there is no need for them
  438.     on our mailing label.  The physical size of the mailing label
  439.     is 6 lines of text, and you want one line above the information 
  440.     on the label, and one line below.  This makes a four line 
  441.     mailing label, which looks something like
  442.  
  443.         First and Last Name 
  444.         Address 
  445.         City,  State Zip Code
  446.  
  447.     Once again, we can take this one step further and build a format file
  448.     from this. It would look something like this:
  449.  
  450.         , 2, 1, 1, ______________________________,{1} & " " & {2}, , 
  451.         , 3, 1, 1, ______________________________, {3}, , 
  452.         , 4, 1, 1, ______________________________, {4} & "\, " & {5}, , 
  453.         , 5, 25, 1, #####-####, {6}, , 
  454.         , 6, 1, 1, , , , 
  455.         
  456.     1) On line 2, column 1 there is a string of 30 characters to print 
  457.       that is the concatenation of fields 1 and 2.
  458.     2) On line 3, column 1, there is another string of 30 characters
  459.        that is the same as field 3 in the datafile.
  460.     3) On line 4, column 1, a string of 30 characters made up of
  461.        field 4 (City) followed by a comma and a space and then 
  462.        field 5 (State).
  463.     4) On line 4, column 25, that the 6th field (Zip Code) should
  464.        be printed.
  465.     6) The fifth line tells HyperBase(tm) to print a blank line 
  466.        for line 6.  
  467.     
  468.     You have just finished a quick tutorial on getting started using 
  469.     HyperBase.  You should now be able to insert records into your 
  470.     newly formed mailing list and even print out mailing labels using 
  471.     either the print entire database option or print selected records 
  472.     using the print search results option. 
  473.     
  474.  
  475.  
  476. Formats for HyperBase Files
  477.  
  478.     In HyperBase, there are 3 different types of files.  There is the
  479.     format files, which has been discussed earlier, the sort index file,
  480.     and the data file.
  481.  
  482.     The data file itself is one of the more flexible features of
  483.     HyperBase.  In the design of HyperBase, we all looked back on our
  484.     experiences with databases and decided that one of the more useful
  485.     options that we would have liked other databases to have, is to
  486.     have an easily readable datafile.  We thought that if the datafile
  487.     was readable, it would be much easier for the user to relate to the
  488.     datafile, and much easier to fix corrupted datafiles.
  489.  
  490.     In a datafile, the first thing on each line is a flag character
  491.     which marks a record as present or deleted.  If you have just
  492.     opened a new datafile or used "CleanUp" there will be no records
  493.     marked deleted.  The deleted flag gets set every time you delete a
  494.     record, or make changes to it.  When you change a record, HyperBase
  495.     flags the current copy as deleted and appends a new record with the
  496.     updated information at the bottom of the file.  This makes it very
  497.     simple to recover from mistakes.
  498.  
  499.     Following the flag character the fields of your data format are
  500.     enclosed in quotes and separated by commas.  For example, if you
  501.     had a record from the mailing list used in the tutorial, it could
  502.     look something like this:
  503.  
  504.     "H","Craig","Norborg","539 N Grant Street","West Lafayette","IN","47904",
  505.  
  506.     The "H" in quotes at the beginning of the line tells me that the
  507.     record is not deleted, if a "D" were there, it would be flagged as
  508.     deleted.  Feel free to go in with your favorite editor and edit
  509.     your datafiles if you prefer this method, it will not affect the
  510.     database as long as you don't mess up the quotes or commas.
  511.     However this will invalidate the index file, which must be rebuilt
  512.     using the "Sort" option from the main menu.  You should also feel
  513.     free to write your own programs to work with the datafile.
  514.  
  515.     The index file is more complex than the datafile and is not in
  516.     human readable form. The index file format is liable to change
  517.     between releases.
  518.  
  519.  
  520.  
  521.     HyperBase Quick Reference Sheet 
  522.     -------------------------------
  523.  
  524.             HyperBase Main Menu 
  525.             -------------------
  526.  
  527.     Command        Key Equiv    Command        Key Equiv    
  528.     New            A-n         Print        A-p 
  529.     Cleanup        A-c        Quit        A-q 
  530.     View        A-v        Insert      A-i
  531.     Search        A-s            Display(Screen)    A-d 
  532.     Display(Printer)    A-r        Delete Found    A-f 
  533.     Delete Not Found    A-!        Sort(Order)    A-o 
  534.     Save                 Sort Index    A-x 
  535.  
  536.     
  537.         HyperBase Browse Menu 
  538.         ---------------------
  539.  
  540.     Command         Key Equiv       Command        Key Equiv
  541.     Redraw        A-r            Save        A-s 
  542.     Quit        A-q        Kill Field    A-k 
  543.     Delete        A-d        Forward        A-f 
  544.     Back        A-b        Goto        A-g 
  545.  
  546.    
  547.            Invoking HyperBase 
  548.            ------------------
  549.    
  550.    HyperBase DataFileName BufferSize 
  551.  
  552.     Example:  
  553.  
  554.         HyperBase Datafile 200 
  555.         
  556.  
  557.     Special characters in files:
  558.  
  559.     Format Characters:
  560.         _       AlphaNumeric Input Field                
  561.         \    Literal next character
  562.         ^       Lock Field                              
  563.         #       Numeric Input Field 
  564.         ,    Separate Fields
  565.  
  566.     Formula Characters:
  567.         +       Addition 
  568.         -    Subtraction
  569.         &       Catenate Strings 
  570.         /    Division                                
  571.         "    Enclose literal strings
  572.         *    Multiplication                          
  573.         []      Substring Operations
  574.  
  575. HyperBase Copyright Notice:
  576. HyperBase is copyright 1987, 1988 by General Design.
  577. The binaries may be distributed free of charge by anyone to anyone.
  578. Special permission must be obtained to distribute HyperBase for a fee.
  579. ( This permission is extended to all non-profit User's Groups for the
  580. purpose of defraying copy & distribution costs) If you like HyperBase
  581. send $25.00 to:
  582.  
  583.         General Design
  584.         P.O. Box 2352
  585.         West Lafayette,  IN  47906
  586.  
  587. For your $25.00 you will recieve the latest binary, source code,
  588. manual and examples. You will also be placed on our mailing list 
  589. and will be notified of bug-fixes and new releases.
  590.  
  591. If you think that $25.00 is too much or you don't like HyperBase send
  592. us a note telling why.
  593.  
  594. HyperBase Sources:
  595. Hyperbase source is free of charge to all registered users.  It
  596. was written in Manx Aztec(tm) C version 3.4a.  We offer single user,
  597. site and distribution licenses for a small fee.  We also offer educational
  598. discounts. Write us at:
  599.  
  600.         General Design
  601.         P.O. Box 2352
  602.         West Lafayette,  IN  47906
  603.  
  604.